/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wakawakathistimeforafrica.tools;

import java.util.ArrayList;
import java.util.Enumeration;
import weka.core.*;
import weka.core.converters.ConverterUtils.*;

/**
 *
 * @author Jissay
 */
public class ArffReader 
{
    Instances data;
    
    public ArffReader() throws Exception
    {
        DataSource ds = new DataSource("res/credit-g.arff");
        this.data = ds.getDataSet();
        this.data.setClassIndex(this.data.numAttributes() - 1); 
        Enumeration enume = this.data.enumerateInstances();
        
//        while (enume.hasMoreElements())
//        {
//            System.out.println(enume.nextElement());
//        }
    }

    public Instances getData() {
        return data;
    }

    public void setData(Instances data) {
        this.data = data;
    }
}
